/**
 * Author: Daniel Michalski
 * Date: 05.03.13
 */

class X {
    int a;
    double b;
}

class Y extends X {
    double c;
}

public class RTTI {
    public static void main(String[] args) {
        X x = new X();
        Y y = new Y();
        Class<?> clObj;

        clObj = x.getClass();
        System.out.println("x jest obiektem typu: " +
                clObj.getName());

        System.out.println("klasa bazowa x to: " +
                clObj.getSuperclass().getName());

        clObj = y.getClass();
        System.out.println("y jest obiektem typu: " +
                clObj.getName());

        clObj = clObj.getSuperclass();
        System.out.println("klasa bazowa y to: " +
                clObj.getName());

        double i = 1;

        for (int j = 0; j < 10000 ; j++) {
            i = Math.nextUp(i);
            System.out.println(i);
        }

    }
}
